package znbkChangeNote.api;

import com.example.lancooznbk.service.HttpPostServer;
import com.lancoo.rxretrofitlibrary.Api.BaseApi;
import com.lancoo.rxretrofitlibrary.listener.HttpOnNextListener;
import com.trello.rxlifecycle.components.support.RxAppCompatActivity;
import com.trello.rxlifecycle.components.support.RxFragment;

import retrofit2.Retrofit;
import rx.Observable;
import znbkChangeNote.entity.DeleteNoteEntity;

/**
 * Created by Administrator on 2018\3\19 0019.
 */

public class DeleteNoteApi extends BaseApi {

    private DeleteNoteEntity mDeleteNoteEntity;

    public DeleteNoteEntity getmDeleteNoteEntity() {
        return mDeleteNoteEntity;
    }

    public void setmDeleteNoteEntity(DeleteNoteEntity mDeleteNoteEntity) {
        this.mDeleteNoteEntity = mDeleteNoteEntity;
    }



    public DeleteNoteApi(HttpOnNextListener listener, RxAppCompatActivity rxAppCompatActivity) {
        super(listener, rxAppCompatActivity);
    }

    public DeleteNoteApi(HttpOnNextListener listener, RxFragment rxFragment) {
        super(listener, rxFragment);
    }

    @Override
    public Observable getObservable(Retrofit retrofit) {
        HttpPostServer httpPostServer = retrofit.create(HttpPostServer.class);

        return httpPostServer.deletePersonalNote(mDeleteNoteEntity);
    }
}